<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style type="text/css">
		*{
			margin: 0px;
			padding: 0px;
		}
		li{
			list-style:none;
		}
		.box{
			width: 450px;
			height: 340px;
			margin: 100px auto 0px;
			overflow: hidden;
		}
		.top{
			width: 450px;
			height: 40px;
		}
		.top .top_item{
			width: 20%;
			height: 40px;
			float: left;
			line-height: 40px;
			text-align: center;
			background: #F5F5F5 url() 0 0 no-repeat;
		}

		.buttom{
			width: 2250px;
			height: 300px;
			position: relative;
			left: -900px;
		}

		.buttom .b_item{
			width: 450px;
			height: 300px;
			background: #80B600 url() 0 0 no-repeat;
			font-size: 50px;
			line-height: 300px;
			text-align: center;
			color: #fff;
			float: left;
			/*position: absolute;*/
			/*top: 0px;*/
			/*display: none;*/
		}



	</style>
	<script type="text/javascript"src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
	<script type="text/javascript">
		$(function  () {
			
			$('.top_item').click(function(event) {
				index = $(this).index();

				$(this).css('background', '#80B600').siblings().css('background', '#F5F5F5');

				$('.buttom').animate({left: index*(-450)+"px"}, 300);

			});
		})
	</script>
</head>
<body>
	<div class="box">
		<ul class="top">
			<li class="top_item" style="background:#80B600">tab1</li>
			<li class="top_item">tab2</li>
			<li class="top_item">tab3</li>
			<li class="top_item">tab4</li>
			<li class="top_item">tab5</li>
		</ul>
		<ul class="buttom">
			<li class="b_item" style="display:block">content1</li>
			<li class="b_item">content2</li>
			<li class="b_item">content3</li>
			<li class="b_item">content4</li>
			<li class="b_item">content5</li>
		</ul>
	</div>
</body>
</html>